The general situation
Many words in Japanese have multiple possible spellings. A good dictionary will include all spellings for each term, and an even better one will note which spellings are common and which are rare.
Your specific sample term
The term in your sample text is ひあたり. Here is the dictionary headline from the Daijirin entry at Weblio:
ひ あたり [0] 【日当(た)り・陽▽当(た)り】
Here's how to read this information.
- ひ あたり
The kana rendering. Spaces are used to show word or morpheme boundaries. We can see here that this is a compound term comprised of ひ and あたり.
- [0]
This is the pitch accent pattern for "standard", that is, Tokyo, Japanese.
In so-called 標準語【ひょうじゅんご】, the basic pitch accent is for a word to start with a low pitch on the first mora (not syllable -- this is the timed unit of sound in a language -- for Japanese, the first kana; see also "Mora" at Wikipedia), with the pitch of the voice then higher on the second mora, and gradually coming back down.
The number in brackets shows the number of the mora after which the term has a downstep -- where the pitch drops back down quickly. Words that have no downstep are marked with the number 0. In the notation we use here at the Japanese StackExchange, we would show the pitch accent pattern for this word like this:
- 【日当(た)り・陽▽当(た)り】
Inside the Japanese corner brackets 【】, we get the spellings.
Kana in parentheses are optional -- some writers will write these explicitly, and others might leave them out.
The nakaguro mark ・ is used to divide multiple different kanji spellings.
The Daijirin dictionary uses the white triangle ▽ to indicate Jōyō kanji used with non-standard readings, readings that are not part of the Jōyō curriculum.
So based on the spelling notation here, we can tell that this word has four spellings, with the latter two less common:
* 日当り
* 日当たり
* 陽当り
* 陽当たり
... and, in fact, the Microsoft Japanese IME on my Windows 10 machine here offers all four as possible conversions for the kana input ひあたり.
Reading and writing in Japanese
Japanese writing is, arguably, the most flexible and expressive writing system around, due to the way in which meaning and nuance can come from two different forms of a word -- the form as spoken, and the form as written. Manga writers make use of this all the time, by adding ruby (furigana) to words, allowing for things like 騎士【ナイト】, where we have both the Japanese term and the English term combined.
This kind of flexible use of spellings and terms has been going on pretty much since Japanese started to get written down over 1,500 years ago. If you ever dive into the Man'yōshū poetry, a compilation of pieces dating from perhaps as early as the 400s and completed around 759, you'll find this kind of writing all over the place, where a single word will appear with multiple spellings, and each spelling (potentially) adds its own overlay of additional meaning.
This kind of flexibility can result in vast complexity, and the Japanese government has stepped in several times in the past century and a half in an attempt at simplifying and standardizing spelling and kanji use. This is what gave rise to the list of Jōyō kanji in the first place.
TL;DR:
Many words have multiple spellings. It's complicated, but it's richly expressive. Hang in there!