Unless the description states the target is aware of the spell, it is not automatically aware by default.
Spells only say what they do. If a target knew it was under the effects of a spell any time a spell was cast on it, then illusion spells would be wholly useless.
Since your question is about charms/enchantments, it's worth pointing out that these spells explicitly state when a target is aware. For example, Friends states the target knows it was magically compelled. Charm Person also states this.
An example of a spell that doesn't state this is Geas. At no point does it say that the affected creature is aware that it is under magical compulsion to obey the command. This is important because if you happen to be a Sorcerer, you could cast this as a subtle spell and the affected target would have absolutely no way to tell it had even been targeted by a magical effect.
By and large, the default for all magic effects is that something is unaware until they discover it through some mechanism. For instance, you would automatically see a fireball coming at you because it's not a hidden object. Whereas you may not notice a delayed blast fireball that's hidden above a door jamb as you passed under it. Other methods of discovering a spell is affecting you are things like, "Hey, the whole world is getting a lot bigger! Hmmmm.... I might be getting shrunk by an enlarge/reduce spell." Or, "How come I have hooves and oh my god I'm a goat." when targeted by a polymorph.
At the end of the day, the question you need to ask is, "Does the spell explicitly state that the creature is aware?"
Worthwhile contribution from Rubiksmoose:
"You and your companions might deduce that you were beguiled if evidence of the spell is found. It’s ultimately up to the DM whether you discover the presence of inconspicuous spells. Discovery usually comes through the use of skills like Arcana, Investigation, Insight, and Perception or through spells like detect magic." http://rpg.stackexchange.com/a/92279/28591
No (probably)
"Sunlight" is not an object "For the purpose of these rules, an object is a discrete, inanimate item like a window, door, sword, book, table, chair, or stone, not a building or a vehicle that is composed of many other objects."
Assuming that the sun in your fantasy world is like our sun (a ball of fusing Hydrogen about 1.5 million km in diameter at a distance of about 150 million km) then there are no Illusion spells with the area of effect or range to duplicate it. Its also pretty animate and not an object by the rules because if liquid isn't an object then neither is superheated plasma.
If your DM has created a world where the sun is a deity then that would be a creature not an object.
If your DM has done something really cool like this:
And the sun toiled across the sky.
Many people have wondered why. Some people think
a giant dung beetle pushes it. As explanations go it
lacks a certain technical edge, and has the added drawback that, as certain circumstances may reveal, it is
possibly correct.
Terry Pratchett, Pyramids
Then you're going to have to ask her.
Best Answer
Yes, you can use Instictive Charm against spell attacks. You can use it against anything that requires an attack roll, not just against the Attack action. From the PHB at p.205:
Note that these are different from spells targeting you against which you get to make a saving throw. Instinctive Charm won't help you with those. Compare Ray of Frost (ranged attack, Instinctive Charm helps) vs. Acid Splash (DEX save, no help here), for instance.