When "to be" should be used? When omitted?
是 in the first context is only used to say:

Noun1 是 Noun2

You never say 我是很好, because 好 isn't a noun. You can say

我是美国人
他是男孩子
我是李红

because all those relate one noun to another. In the case of 我25岁了, 25 years old isn't a noun, it's a state, and so we don't use 是.
For a simple summary, 是 only relates 2 nouns to each other. If it's not a noun, don't use 是.
You can find more info and examples here, which I find is a good site for beginners to learn chinese, and gives lots of examples to help you understand.