Since I was getting a bit caught up in trying to write out some fairly complex things in comments to @medica’s answer, I am going to write it all out in a full answer here.
Basically, there is a more or less regular variation in some words between final -y and non-final -i- (sometimes -ie) in English orthography. That means that when adding various suffixes to words that end in -y, you he to know whether to change it to an -i- or not, based on a certain set of rules (plus some exceptions—this is English after all). The rules for when to choose what are as follows:
Phonetic quality of -yThe first thing to determine is how the -y is pronounced. There are three possibilities here:
/i/, as in ‘ready’, ‘silly’, etc. /ai/, as in ‘sly’, ‘shy’, ‘apply’, etc. /j/, as in ‘day’, ‘whey’, ‘coy’, ‘buoy’, etc.Regardless of what suffix you’re adding, these different pronunciations affect when the spelling does and does not change.
Phonetic makeup of suffixesIn addition, the pronunciation of the suffix that you add to the end of the word also makes a difference, or rather, the start of the suffix does. Here there are four possible variations:
Suffix consists only of one consonant (noun-plural -(e)s, verbal third singular present -(e)s, past -(e)d, strong verb passive participle -(e)n) Suffix starts with a consonant (-ness, -ful, -less, -some, etc.) Suffix starts with the vowel /i/ (-ing, -ish, -ive, -ify, etc.) Suffix starts with any other vowel (-er, -est, -en, -able, etc.) Combining -y and suffixWhen you combine a final -y with a suffix, you he to look at each combination of the seven options mentioned above separately (though some of them can be lumped together, of course).
In the following, I will simply write the -y as its phonetic realisation (/i/, /ai/, or /j/), and as a shorthand, I’ll write the suffixes as simply X (only one consonant), C (consonant-initial), I (starts with /i/), and V (starts with any other vowel). If a rule goes for all types of -y or suffixes, I write ANY. (If two types go together, I just write them together; so CV means ‘suffix that starts with a consonant or a vowel that isn’t /i/’, for instance, and /i ai/ means -y pronounced either as /i/ or as /ai/.)
Exceptions to the main rules are in bold.
(‘Daily’ is in the very last section.)
ANY + I ⟹ -y-Before a suffix that starts in /i/, -y never changes—it always remains -y-, no matter how it’s pronounced. (Even words that end in -ie change this to -y- here, such as die ⟹ dying, or lie ⟹ lying.)
busy ⟹ busying say ⟹ saying shy ⟹ shying clay ⟹ clayish dry ⟹ dryish/i ai/ + X ⟹ -ie-
Before a suffix consisting of only one consonant, -y pronounced /i/ or /ai/ is written -ie-
busy ⟹ busied, busies dry ⟹ dries, dried/i/ + CV ⟹ -i-
Before a suffix starting in a consonant or a non-/i/ vowel, -y pronounced /i/ changes to -i-. (This does not happen in the rare instance where the -y pronounced /i/ follows a vowel sound; so gooey ⟹ gooeyness, rather than *gooiness or *gooeiness.)
busy ⟹ business, busier, busily study ⟹ studier, ?studiable very ⟹ verily/ai/ + CV ⟹ -y- (sometimes also -i-)
Before a suffix starting in a consonant or non-/i/ vowel, -y pronounced /ai/ generally remains in monosyllabics, though there are some individual exceptions where a variant spelling with -i- also exists. In polysyllabic words, -i- is the rule.
shy ⟹ shyly (shily), shyer (shier), shyest (shiest), shyness (shiness) (forms with -i- all rare) cry ⟹ cryer/crier, ?cryable dry ⟹ dryly/drily, dryable/driable, dryness apply ⟹ appliance, (?)applier rely ⟹ reliant, reliance/j/ + X ⟹ -y- (sometimes -i-)
Before a suffix consisting of only one consonant, -y pronounced /j/ generally remains. After such a y, the past and past participle suffix is -ed (with the e), but the present suffix is -s with no e. In the past and past participle forms of some irregular verbs, the y changes to -i-, and the suffix, whether -(e)d or -(e)n, never has an e.
day ⟹ days play ⟹ plays, played slay ⟹ (?)slayed, slain lay ⟹ lays, laid, lain toy ⟹ toys, toyed/j/ + V ⟹ -y-
Before a suffix starting in a vowel, -y pronounced /j/ usually remains. Only one exception that I can think of, highlighted below.
grey ⟹ greyer, greyest, ?greyable coy ⟹ coyer, coyest buy ⟹ buyer, buyable gay ⟹ gayer, gayety/gaiety/j/ + C ⟹ -y- or -i-
Before a suffix starting in a consonant, the basic rule seems to be that -y remains; but there are some exceptions where it changes to -i-, one of which is the word asked about in the question: daily. Sadly, these exceptions seem completely random and must be learnt by heart.
coy ⟹ coyly, coyness grey ⟹ (?)greyly, greyness gay ⟹ gaily, gayness day ⟹ daily, ?dayful array [in the sense ‘beautiful clothes’] ⟹ raiment (from earlier (ar)rayment)