ドキドキ = sound of your heart beating when you get excited (from song) I picked this word just because it sounded cute! It is written in Katakana because it is an onomatopoeia. It also shows how Japanese people hear the sound of heart beating. For example, Americans hear it as dub-dub, Thai people hear it as toob-toob, and so the onomatopoeia would differ from one language to another.
エネルギー = energy
It is a loanword, so it makes sense why katakana is used in this instance. It also reflects how Japan is being influenced by western cultures to a certain extent. We can see that エネルギー is being used to refer to 'energy', and is supposedly understood by all because the word can be ubiquitously found in food packages which are accessible to all classes of people.
アップル = apple
This word was found printed on a candy package as one of the flavors. It is in katakana because it is a loan word from English. However, it is interesting how the manufacturer did not use りんご which is a more traditional word. The effect of using its English counterpart is that the product suddenly appears more modern and trendy because it seems that, in a modern world, every educated person should know English. Teenagers in Thailand are starting to mix more English words in their Thai conversation now... so I imagine the same thing could happen to Japanese culture.
As for the question why each textbook explains the meaning of Katakana differently, I don't have any insightful meaning to offer. I think it's quite simple... it's the truth that katakana is most often used for loanwords. So the textbooks offer the same explanation, but phrase it differently. The book called Japanese for busy people offers a more thorough explanation where it includes a broader extent of usage. I have learned that, in the past, Japanese people sent telegrams using only Katakana, that could also be one of the instances where Katakana is used, however it is not very common anymore so I guess the authors can take the liberty to exclude that explanation to avoid unnecessary confusion.