There are subtle hints about the two being homosexual and the fact that it was a common knowledge among the nobles.
Hints from the Books
Catelyn noted it when she was with Renly that he was more attached to Loras than to his wife.
From time to time, King Renly would feed Margaery some choice morsel
off the point of his dagger, or lean over to plant the lightest of
kisses on her cheek, but it was Ser Loras who shared most of his
jests and confidences.
ACOK - Catelyn II
But Catelyn did not appear to think that they were homosexual. There was another curious moment which Catelyn failed to take a note of when Renly sent everyone away at night but asked Loras to stay.
"You might do well to pray yourself," Catelyn added.
Renly laughed. "Loras, stay and help me pray. It's been so long
I've quite forgotten how. As to the rest of you, I want every man in
place by first light, armed, armored, and horsed. We shall give
Stannis a dawn he will not soon forget."
ACOK - Catelyn III
There were others however who appear to have known about it. Prince Oberyn Martell, himself bisexual, had the following conversation with Tyrion.
"There are those who say Ser Loras is better than Leo Longthorn ever
was," said Tyrion.
"Renly's little rose? I doubt that."
"Doubt it all you wish," said Tyrion, "but Ser Loras has defeated many
good knights, including my brother Jaime."
ASOS - Tyrion V
The choice of words here is curious.
Then of course we have Jaime, blunt as ever.
Ser Loras edged around him. "Are you a craven as well as a killer,
Brienne? Is that why you ran, with his blood on your hands? Draw your
"Best hope she doesn't." Jaime blocked his path again. "Or it's like
to be your corpse we carry out. The wench is as strong as Gregor
Clegane, though not so pretty."
"This is no concern of yours." Ser Loras shoved him aside.
Jaime grabbed the boy with his good hand and yanked him around. "I am
the Lord Commander of the Kingsguard, you arrogant pup. Your
commander, so long as you wear that white cloak. Now sheathe your
bloody sword, or I'll take it from you and shove it up some place even
Renly never found."
ASOS - Jaime VII
And then we have Stannis:
"A year ago I was scheming to make the girl Robert's queen," Renly
said, "but what does it matter? The boar got Robert and I got
Margaery. You'll be pleased to know she came to me a maid."
"In your bed she's like to die that way."
ACOK - Catelyn III
Cersei was also aware of Ser Loras's reputation. She specifically did not want Tommen to be a squire for Ser Loras because the relation between a squire and his master was very close and she suspected that Loras might turn Tommen gay.
“The Red Keep has had no master-at-arms since Aron Santagar was
slain,” Ser Loras said, with a hint of reproach in his voice. “His
Grace is almost nine, and eager to learn. At his age he should be a
squire. Someone has to teach him.”
Someone will, but it will not be you. “Pray, who did you squire for,
ser?” she asked sweetly. “Lord Renly, was it not?”
“I had that honor.”
“Yes, I thought as much.” Cersei had seen how tight the bonds grew
between squires and the knights they served. She did not want Tommen
growing close to Loras Tyrell. The Knight of Flowers was no sort of
man for any boy to emulate.
AFFC- Cersei V
Then of course we have Ser Loras' own reactions as well. When Renly died, he killed those present around him in rage and took his corpse with him, and buried him in secret.
Varys gave him a simpering smile. “You would win, my lord. Lord
Alester was indeed the first to bend the knee. Many others followed.”
“Many,” Tyrion said pointedly, “but not all?”
“Not all,” agreed the eunuch. “Not Loras Tyrell, nor Randyll Tarly,
nor Mathis Rowan. And Storm’s End itself has not yielded. Ser Cortnay
Penrose holds the castle in Renly’s name, and will not believe his
liege is dead. He demands to see the mortal remains before he opens
his gates, but it seems that Renly’s corpse has unaccountably
vanished. Carried away, most likely. A fifth of Renly’s knights
departed with Ser Loras rather than bend the knee to Stannis. It’s
said the Knight of Flowers went mad when he saw his king’s body, and
slew three of Renly’s guards in his wrath, among them Emmon Cuy and
ACOK- Tyrion VII
We didn't see any of Robb's, Balon's, Joffrey's sworn swords react that way. No one got that emotional.
Then there's something that he said to Tyrion which pretty much says it all that Renly and Loras were in love and a relationship.
"House Tyrell continues through my brothers," Ser Loras said. "It is
not necessary for a third son to wed, or breed."
"Not necessary, but some find it pleasant. What of love?"
"When the sun has set, no candle can replace it."
"Is that from a song?" Tyrion cocked his head, smiling. "Yes, you are
seventeen, I see that now."
ASOS- Tyrion II
So spake Martin
George has confirmed that he meant for Loras and Renly to be gay, implying that those picking up on the hints are not wrong.
And speaking of Renly and Loras...
George specifically stated "Yes, I did intend those characters to be
gay." Not that we didn't already know that of course, but I don't
believe it's ever been actually confirmed before.
The Citadel: TO BE CONTINUED (CHICAGO, IL; MAY 6-8)
He also confirmed that Tyrells are aware of his sexuality.
[Are Mace Tyrell and the Queen of Thorns aware of Loras's sexuality?]
Yes and yes.
The Citadel: LORAS, ROBERT ARRYN, THE CLEGANE SISTER, AND A SWORD
As to the question whether their relationship was a public knowledge, given Jaime's comment about sheating swords, he replied with a question:
Q: Is it well known that Renly and Loras are gay? (Jaime's comment
seems to indicate as much.)
A: What do you think?
The Citadel: CORRESPONDENCE WITH FANS