If there's a monk without any attainment of awakening yet and a layperson with some stage of attainment (say sotapanna, anagami), what does the sutta text say about virtue of them?
Monasticism is a vehicle, not a destination; simply putting on the robes doesn't make one more virtuous.
A monk without any attainment whatsoever is not worth being called a monk. A true monk is defined by their attainments, as per the Dhammapada (Buddharakkhita, trans):
9. Whoever being depraved, devoid of self-control and truthfulness, should don the monk’s yellow robe, he surely is not worthy of the robe.
362. He who has control over his hands, feet and tongue; who is fully controlled, delights in inward development, is absorbed in meditation, keeps to himself and is contented — him do people call a monk.
367. He who has no attachment whatsoever for the mind and body, who does not grieve for what he has not — he is truly called a monk.
If one is corrupt, they are not considered worthy of being called a recluse:
184. Enduring patience is the highest austerity. "Nibbana is supreme," say the Buddhas. He is not a true monk who harms another, nor a true renunciate who oppresses others.
260. A monk is not an elder because his head is gray. He is but ripe in age, and he is called one grown old in vain.
261. One in whom there is truthfulness, virtue, inoffensiveness, restraint and self-mastery, who is free from defilements and is wise — he is truly called an Elder.
307. There are many evil characters and uncontrolled men wearing the saffron robe. These wicked men will be born in states of woe because of their evil deeds.
394. What is the use of your matted hair, O witless man? What of your garment of antelope’s hide? Within you is the tangle (of passion); only out- wardly do you cleanse yourself.
395. The person who wears a robe made of rags, who is lean, with veins showing all over the body, and who meditates alone in the forest – him do I call a holy man
That being said, there is a little-known but pithy passage in the Sutta Nipata (vv. 220-221; Ireland, trans) where the Buddha says:
These two ways of life are not the same: that of a householder supporting a wife and one without worldly attachments...
As a peacock never approaches the swiftness of a swan, so a householder cannot imitate a bhikkhu, a hermit meditating in the forest.
Again, this only applies if all else (i.e. their practice and attainments) is equal.
Interpreting virtue as "behavior showing high moral standards". The person with the attainments would be more virtus / morale, as monk without attainment may transgress the moral code which they live by (even any or the lay percents - some overlap with disrobing offences here also) but an attained person will have only a lesser chance of doing so depending on the level of attainment. (5 precepts being automatic from the 1st stage of sainthood. As more fetters drop more moral you become.)
With regard to respect lay people should have towards either of them, the monk should come foremost, as
- All Buddha's efforts over many life times was to establish the order of monks, if it is not for this effort we will have not monks or lay people
- The order institutionalizes the practice and preserves it for future generations and also is instrumental in practice, so if lay support and respect diminishes the order will decay
- Monks have devoted more time to practice than lay people, when time comes lay people will have to enter the order. So you should be respectful or this as monkhood aids people to gain more Karma and do better practice
- In balance of probability a monk will have a higher chance of attainment than a lay person
- Though a monk without attainment may transgress some monastic codes they have undertaken to live by more strict standers
An enlightened lay person is more virtuous than an unenlightened monk. Because such a lay person would be devoid of certain unvirtuous qualities which the monk would be having. But a monk with a similar attainment would be more virtuous than a lay person with a similar attainment due to the higher Sila.
According to SN 55.7:
"There is the case where a disciple of the noble ones reflects thus: 'I love life and don't love death. I love happiness and abhor pain. Now if I — loving life and not loving death, loving happiness and abhorring pain — were to be killed, that would be displeasing & disagreeable to me. And if I were to kill another who loves life and doesn't love death, who loves happiness and abhors pain, that would be displeasing & disagreeable to the other. What is displeasing & disagreeable to me is displeasing & disagreeable to others. How can I inflict on others what is displeasing & disagreeable to me?' Reflecting in this way, he refrains from taking life, gets others to refrain from taking life, and speaks in praise of refraining from taking life. In this way his bodily behavior is pure in three ways.
"Furthermore, he reflects thus: 'If someone, by way of theft, were to take from me what I haven't given, that would be displeasing & disagreeable to me... If someone were to commit adultery with my wives, that would be displeasing & disagreeable to me... If someone were to damage my well-being with a lie, that would be displeasing & disagreeable to me... If someone were to divide me from my friends with divisive speech, that would be displeasing & disagreeable to me... If someone were to address me with harsh speech, that would be displeasing & disagreeable to me... If someone were to address me with idle chatter, that would be displeasing & disagreeable to me. And if I were to address another with idle chatter, that would be displeasing & disagreeable to the other. What is displeasing & disagreeable to me is displeasing & disagreeable to others. How can I inflict on others what is displeasing & disagreeable to me?' Reflecting in this way, he refrains from idle chatter, gets others to refrain from idle chatter, and speaks in praise of refraining from idle chatter. In this way his verbal behavior is pure in three ways."
So according to this a stream enterer will live according to the five precepts, so it follows that the same would be true of everyone above that too.
For the source of this quote and more info about the stream enterer I reccomend Ajahn Thanissaro's study guide that is filled with Sutta quotes on the subject here:
The one who does not judge virtue is more virtuous. How can we know the inner intentions and experiences of another person? Each one is a Buddha waiting to be revealed. If one judges another, one identifies with outer appearances that one judges. This is an impediment to awakening that is not dependent on gaining virtue or merit, but on releasing and being free of identification with the self based in form as one primary identity. If you asked Dogen this question how do you think he will answer?