The Oxford English Dictionary gives its first use of square in the 1560s, writing:
a. To multiply (a number) by itself.
?a1560 L. Digges Geom. Pract.: Pantometria (1571) i. xxx. sig. Iiv, Now square 2400 pase, so haue you 5760000.
?a1560 L. Digges Geom. Pract.: Pantometria (1571) ii. xii. sig. Nijv, The number proceeding of the perches squared.
It says that the etymology of the word itself is even earlier, and that there are several known spellings:
Forms: Also ME squaryn, sqvare, sqware, 15 squyer.
Etymology: < Old French esquarrer (escarrer, equarrer), = Portuguese esquadrar, Spanish escuadrar, Italian squadrare < popular Latin *exquadrāre, < Latin ex out + quadra square. Old French had also esquarrir (escarrir, etc., modern French équarrir).
The first known use of the noun is in 1557:
1557 R. Record Whetstone of Witte sig. Giiiv, Twoo multiplications doe make a Cubike nomber. Likewaies .3. multiplications doe giue a square of squares.
For cube, the OED says that the etymology is
Etymology: corresponds to French cuber (1554 in Hatzfeld & Darmesteter) and probably modern Latin cubāre, < Latin cubuscube n.
As a verb, the first recorded use is given as
1588 C. Lucar tr. N. Tartaglia Three Bks. Shooting 62, I did cube those foure ynches and the Cube thereof was 64.
Note that the noun cube was used to refer to a geometric solid in the 1300s, but the use of a number to its third power dates only to 1557:
- Arith. and Algebra. The product formed by multiplying any quantity into its square; the third power of a quantity.
1557 R. Record Whetstone of Witte sig. Civ, When I saie twoo tymes twoo, twise, maketh 8. that number is a sounde number: and is named a Cube.
As @GEdgar mentioned, there is a word for taking a number to its fourth power. The only recorded use of this in the OED is in the 1600s, with no further examples since:
biquadrate trans. To raise (a number) to its fourth power.
1694 Philos. Trans. (Royal Soc.) 18 70 Performed by squaring, cubing, biquadrating, etc. of the terms.
The use of the associated noun has recorded use after this into the 1800s, but it is likely that it fell out of use following this:
The square of the square (power or root); the fourth power in arithmetic and algebra; = biquadratic adj. and n.
1706 Phillips's New World of Words (ed. 6) , Biquadrate,‥the fourth Power in Arithmetic and Algebra.
1806 C. Hutton Course Math. I. 171 Its‥cube (a3), or biquadrate (a4).
1806 C. Hutton Course Math. I. 203 The biquadrate root of 16a4 − 96a3x + 216a2x2 − 216ax3 + 81x4.