Sharp embeddings for classes of weights and applications