tl;dr: be + infinitive can be used to communicate expectations. Whether it is declarative or imperative probably depends more on context than on any particular grammatical feature.
It is to be discussed.
In this example, I read "be" as a copular auxilliary verb. Its complement is the infinitive verb phrase "to be discussed."
I would read "discussed" as a passive verb. This reading requires the listener to fill in the agent from contextual knowledge. (e.g., "It is to be discussed [by the committee].")
Most English users would probably hear this as a declarative statement of someone's intent, not as an imperative command. The same idea could be rephrased as "I expect it to be discussed" or "The committee intends to discuss it."
You are to be dressed and ready by 8:00.
As with Example 1, the sentence starts with a personal pronoun and a copular "be." The complement is the infinitive verb phrase "to be dressed and ready," which is modified by the prepositional phrase "by 8:00."
Though this is grammatically similar to Example 1, most native English speakers would probably read this as an imperative command rather than a declarative statement of someone's intent. Why? Context, context, context.
First of all, the sentence's subject is the second-person pronoun "you." This immediately situates the speaker as "I." Secondly, the speaker has very specific expectations: "dressed and ready by 8:00."
At this point, we should ask why the speaker has such specific expectations. Here are the likeliest explanations I can think of:
Option 1: The speaker is intimately acquainted with what the subject is planning to do.
Option 2: The speaker is communicating expectations to the subject so that the subject will plan accordingly.
Again, the correct interpretation would depend on context. However, Option 2 is much likelier in my experience (and, I suspect, in the experience of most native English speakers).
Here's some more information about the be + to construction in English.