Our Gemara on Amud Aleph quotes the verse in Devarim (25:2-3) which are the scriptural source for the punishment of lashes. It is notable that though the verse states 40 lashes, there is a rabbinic tradition that seemingly overrides the explicit verse and the number of lashes is never to exceed 39.  (For more on the philosophical and psychological implications of this dichotomy, see Psychology of the Daf, Kesuvos 32.)  Regardless of the numerical discrepancy, one thing is for sure, the number 39 must be deliberate, as it is not a round number and also against the explicit verse.

Rabbenu Bechaye on this verse notes that Lamed-Tes, 39, is an anagram for Tal.  He suggests that the lashes are in lieu of the death penalty, and thus the lashes are like the Tal (dew) of the future which is going to revive the dead.

Maharal Gur Aryeh on this verse explains as follows.  We have a teaching that the fetus is formed in 40 days. However, actually, the physical body is completed on day 39.  Once complete, it is a receptacle for the soul which arrives on day 40.  (This lends credence to the idea that abortion by day 40 is more probelmatic, as now the fetus is a human entity with a soul.). Thus, the body is given 39 lashes to correspond to the sins that come from physicality, exemplified in the 39 days of formation of the body.  This Maharal might also explain the discrepancy between 40 lashes in the verse and 39 in the Oral Torah.  The written Torah expresses concrete truths, and the oral Torah represents a more spiritual dimension.  Thus, the external reality is that the fetus is formed in 40 days, but in the hidden truth, the 40th day is for the soul.

Tosafos Yom Tov on Mishna Shabbos (7:2) wonders why the language of the Mishna uses a verbose term, “Forty less one” to enumerate the 39 melachos.  It is far simpler to say 39.  He suggests that the rabbis used the rabbinical language that corresponds with the lashes, also enumerated as forty less one.  However, Tosafos Yom Tov does not explain why.  Based on the Maharal we can suggest that the rabbis were hinting at the concept that 39 represents physicality.  The 39 prohibited forms of work on Shabbos are a renunciation of physicality to achieve a higher spiritual state on Shabbos.  (See Psychology of the Daf, Kesuvos 34.)